/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package koala.objects;

import java.util.Comparator;
import java.util.ArrayList;

public class User implements Comparator<User> {
    private String userId;
    private byte[] password;
    private String name;
    private ArrayList<Project> projects;
    private boolean state;
    
    public User(){
        
    }
    
    public User(String userId, byte[] password, String name,ArrayList<Project> projects, boolean state){
        this.userId = userId;
        this.password = password;
        this.name = name;
        this.projects = projects;
        this.state = state;
    }
    
    public User(String userId, String name, boolean state){
        this.userId = userId;
        this.name = name;
        this.state = state;
    }
    
    public String getUserId(){
        return userId;
    }
    
    public byte[] getPassword(){
        return password;
    }
    
    public String getUsername(){
        return name;
    }
    
    public ArrayList<Project> getProjects(){
        return projects;
    }
    
    public boolean getState(){
        return state;
    }
    
    public void setUserId(String userId){
        this.userId = userId;
    }
    
    public void setPassword(byte[] password){
        this.password = password;
    }
    
    public void setUsername(String name){
        this.name = name;
    }
    
    public void setProjects(ArrayList<Project> projects){
        this.projects = projects;
    }
    
    public void setState(boolean state){
        this.state = state;
    }

    @Override
    public int compare(User o1, User o2) {
        return o1.name.compareTo(o2.name);
    }
    
    //method for uploading file here
    
    
}
